"It can be used only by extensions.gnome.org"
#define PLUGIN_MIME_STRING "application/x-gnome-shell-integration::Gnome Shell Integration Dummy Content-Type";
-#define PLUGIN_API_VERSION 3
+#define PLUGIN_API_VERSION 4
typedef struct {
GDBusProxy *proxy;
static gboolean
plugin_install_extension (PluginObject *obj,
- NPString uuid,
- NPString version_tag)
+ NPString uuid)
{
gchar *uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length);
- gchar *version_tag_str;
if (!uuid_is_valid (uuid_str))
{
return FALSE;
}
- version_tag_str = g_strndup (version_tag.UTF8Characters,
- version_tag.UTF8Length);
-
g_dbus_proxy_call (obj->proxy,
"InstallRemoteExtension",
- g_variant_new ("(ss)",
- uuid_str,
- version_tag_str),
+ g_variant_new ("(s)", uuid_str),
G_DBUS_CALL_FLAGS_NONE,
-1, /* timeout */
NULL, /* cancellable */
NULL /* user_data */);
g_free (uuid_str);
- g_free (version_tag_str);
return TRUE;
}
else if (name == install_extension_id)
{
if (!NPVARIANT_IS_STRING(args[0])) return FALSE;
- if (!NPVARIANT_IS_STRING(args[1])) return FALSE;
return plugin_install_extension (obj,
- NPVARIANT_TO_STRING(args[0]),
- NPVARIANT_TO_STRING(args[1]));
+ NPVARIANT_TO_STRING(args[0]));
}
else if (name == uninstall_extension_id)
{
const ENABLED_EXTENSIONS_KEY = 'enabled-extensions';
-function installExtensionFromUUID(uuid, version_tag) {
+function installExtensionFromUUID(uuid) {
let params = { uuid: uuid,
- version_tag: version_tag,
- shell_version: Config.PACKAGE_VERSION,
- api_version: API_VERSION.toString() };
+ shell_version: Config.PACKAGE_VERSION };
let message = Soup.form_request_new_from_hash('GET', REPOSITORY_URL_INFO, params);
_httpSession.queue_message(message,
function(session, message) {
let info = JSON.parse(message.response_body.data);
- let dialog = new InstallExtensionDialog(uuid, version_tag, info.name);
+ let dialog = new InstallExtensionDialog(uuid, info.name);
dialog.open(global.get_current_time());
});
}
Name: 'InstallExtensionDialog',
Extends: ModalDialog.ModalDialog,
- _init: function(uuid, version_tag, name) {
+ _init: function(uuid, name) {
this.parent({ styleClass: 'extension-dialog' });
this._uuid = uuid;
- this._version_tag = version_tag;
this._name = name;
this.setButtons([{ label: _("Cancel"),
_signals.emit('extension-state-changed', state);
- let params = { version_tag: this._version_tag,
- shell_version: Config.PACKAGE_VERSION,
- api_version: API_VERSION.toString() };
+ let params = { shell_version: Config.PACKAGE_VERSION };
let url = REPOSITORY_URL_DOWNLOAD.format(this._uuid);
let message = Soup.form_request_new_from_hash('GET', url, params);
</method>
<method name="InstallRemoteExtension">
<arg type="s" direction="in" name="uuid"/>
- <arg type="s" direction="in" name="version"/>
</method>
<method name="UninstallExtension">
<arg type="s" direction="in" name="uuid"/>
return extension.errors;
},
- InstallRemoteExtension: function(uuid, version_tag) {
- ExtensionSystem.installExtensionFromUUID(uuid, version_tag);
+ InstallRemoteExtension: function(uuid) {
+ ExtensionSystem.installExtensionFromUUID(uuid);
},
UninstallExtension: function(uuid) {